package com.example.service.impl;

import com.example.dao.IOrdersDao;
import com.example.domain.Orders;
import com.example.service.IOrdersService;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Date: 2021年08月19日 10:26
 * @Author: LHSAMA
 */
@Service
@Transactional
public class OrdersServiceImpl implements IOrdersService {

    @Autowired
    private IOrdersDao OrdersDao;

    @Override
    public List<Orders> findAll(int page,int size)  {
        PageHelper.startPage(page,size);
        return OrdersDao.findAll();
    }

    @Override
    public Orders findById(String id) {
        return OrdersDao.findById(id);
    }
}
